package com.projektio.io;

public class ImageAttribute
{
	int row;
	int column;
	int whitePixels;
	int blackPixels;
	short[] color;
	
	public ImageAttribute(int row, int column, int white, int black, short[] color)
	{
		this.row = row;
		this.column = column;
		this.whitePixels = white;
		this.blackPixels = black;
		this.color = color;
	}
	
	public void setColor(short[] color)
	{
		this.color = color;
	}
	
	public short[] getColor()
	{
		return color;
	}

	public void setRow(int value)
	{
		this.row = value;
	}
	
	public int getRow()
	{
		return this.row;
	}
	
	public void setColumn(int value)
	{
		this.column = value;
	}
	
	public int getColumn()
	{
		return this.column;
	}
	
	public void setWhitePixels(int value)
	{
		this.whitePixels = value;
	}
	
	public int getWhitePixels()
	{
		return this.whitePixels;
	}
	
	public void setBlackPixels(int value)
	{
		this.blackPixels = value;
	}
	
	public int getBlackPixels()
	{
		return this.blackPixels;
	}
	
	public boolean equals(Object attr)
	{
		if(!(attr instanceof ImageAttribute)) return false;
		ImageAttribute attrib = (ImageAttribute) attr;
		return (this.row == attrib.row) && (this.column == attrib.column) && (this.whitePixels == attrib.whitePixels) && (this.blackPixels == attrib.blackPixels);
	}
	
	public int hashCode()
	{
		return row * column * whitePixels * blackPixels;
	}
	
	public String toString()
	{
		return "R" + row + " C" + column + " WH" + whitePixels + "BL" + blackPixels;
	}
}
